﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Caduceu.Estudos.Erros
{
    public static class Messages
    {
        public static string GetMessage(string errorCode)
        {
            string erro = Caduceu.Estudos.Erros.ErrMessages.ResourceManager.GetString(errorCode);
            if (string.IsNullOrEmpty(erro))
                throw new Exception("ERR_0000 - UNDOCUMENTED ERROR");

            return erro;
        }

        public static string GetMessage2(string errorCode)
        {
            return string.Format("{0} - {1}", errorCode, GetMessage(errorCode));
        }
    }
}
